<div class="header navbar navbar-inverse navbar-fixed-top">
	<!-- BEGIN TOP NAVIGATION BAR -->
	<div class="header-inner">
		<!-- BEGIN LOGO -->
		<a class="navbar-brand" href="<?= $this->webroot . 'admin/' ?>">
			<!--<img src="<?= $this->webroot  ?>assets/img/logo.png" alt="logo" class="img-responsive"/>-->
			<i class="fa fa-desktop ml20"></i>
			<span>HaTaKua</span>
		</a>
		<!--<form class="search-form search-form-header" role="form" action="index.html">
			<div class="input-icon right">
				<i class="fa fa-search"></i>
				<input type="text" class="form-control input-medium input-sm" name="query" placeholder="Search...">
			</div>
		</form>-->
		<!-- END LOGO -->
		<!-- BEGIN RESPONSIVE MENU TOGGLER -->
		<a href="javascript:;" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
			<img src="<?= $this->webroot  ?>assets/img/menu-toggler.png" alt=""/>
		</a>
		<!-- END RESPONSIVE MENU TOGGLER -->

		<!-- BEGIN TOP NAVIGATION MENU -->
		<ul class="nav navbar-nav pull-right">

			<!-- BEGIN INBOX DROPDOWN -->
			<li class="dropdown" id="header_inbox_bar">
				<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
					<i class="fa fa-envelope"></i>
					<?php if(count($messages) > 0):?><span class="badge badge-danger"><?= count($messages) ?></span><?php endif; ?>
				</a>
				<ul class="dropdown-menu extended inbox">
					<li> <p><?= __('Bạn có %s tin nhắn', count($messages)); ?></p> </li>
					<li>
						<?php $height = count($messages) >= 3 ? 250 : (count($messages) * 83) ;?>
						<ul class="dropdown-menu-list scroller" style="height: <?= $height;?>px;">
							<?php if(count($messages) > 0): ?>
							<?php foreach($messages as $ct): ?>
							<li>
								<a href="<?= $this->webroot.'admin/contacts/detail/'.$ct['Message']['id'] ?>">
							<!--	<span class="photo">
									<img src="<?= $this->webroot  ?>assets/img/avatar2.jpg" alt=""/>
								</span>-->
								<span class="subject">
									<span class="from"><?= $ct['Message']['fullname']; ?> </span>
									<span class="time"> <?= $ct['Message']['created']; ?></span>
								</span>
								<span class="message">
									 <?= $ct['Message']['title']; ?>
								</span>
								</a>
							</li>
							<?php endforeach; ?>
							<?php endif; ?>
						</ul>
					</li>
					<li class="external">
						<a href="<?= $this->webroot . 'admin/contacts'?>"><?= __('Xem tất cả tin nhắn');?> <i class="fa fa-angle-right"></i></a>
					</li>
				</ul>
			</li>
			<!-- END INBOX DROPDOWN -->

			<li class="devider"> &nbsp; </li>
			<!-- BEGIN USER LOGIN DROPDOWN -->
			<li class="dropdown user">
				<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
				<img alt="" src="<?= $this->webroot  ?>assets/img/avatar3_small.jpg" style="height:29px"/>
				<span class="username"> <?= $global_user['fullname'] ?> </span>
				<i class="fa fa-angle-down"></i>
				</a>
				<ul class="dropdown-menu">
					<li> <a href="<?= $this->webroot .'admin/users/add/' . $global_user['id'] ?>"><i class="fa fa-user"></i><?= __('Thông tin cá nhân') ?></a> </li>
					<li class="divider"></li>
				</li>
				<li>
					<a href="<?= $this->webroot .'admin/users/logout' ?>"><i class="fa fa-key"></i> <?= __('Đăng xuất') ?></a>
				</li>
			</ul>
		</li>
		<!-- END USER LOGIN DROPDOWN -->
	</ul>
	<!-- END TOP NAVIGATION MENU -->
</div>
<!-- END TOP NAVIGATION BAR -->
</div>